Skip to content

Conversation

alifarooq93
Copy link
Contributor

More structured and generalized code with

  • input layout
  • loading
  • charts
  • api calls
  • slider
  • popups
  • geojson data

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alifarooq93 We definitely need to make this generic as well. Maybe via handlebar and tiptap editor (like in our internal project) or via simple datastructure

type PopupConfig = {
    titleProp: string;
    details?: {
        label: string;
        prop: string;
    }[];
}

For the current dataset it would the be as

const popupConfig: PopupConfig = {
    titlePorp: 'BADEGEWAESSERNAME',
    details: [
        { label: t('quality'), prop: 'EINSTUFUNG_ODER_VORABBEWERTUNG' },
        { label: t('category'), prop: 'GEWAESSERKATEGORIE' },
        { label: t('depth'), prop: 'SICHTTIEFE' },
        { label: t('seasonal'), prop: 'SAISONBEGINN' }, // need o figure out how we can add SAISONENDE and GESCHLOSSEN
        { label: t('infrastructure'), prop: 'INFRASTRUKTUR' },
    ]
}

Comment on lines +48 to +56
defineProps([
'dateGroup',
'dateOptions',
'selectedIndex',
'selectedDate',
'isSmallScreen',
]);

defineEmits(['update:selectedIndex']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,33 @@
const yearColors = ['#3B82F6', '#10B981', '#8B5CF6', '#F59E0B', '#EF4444'];

export function getDatesGroups(fetchedData: any) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alifarooq93 Do we have a simple chance to avoid the any and use proper type definitions.

This is a global question.

Comment on lines +17 to +21
"chartX": "Datum",
"chartY": "Tiefe (m)",
"chartTitle": "Tiefe für",
"chartLegend": "Tiefe im Zeitverlauf",
"chartEmpty": "Es sind keine Tiefenangaben verfügbar für"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alifarooq93 The translation does not fit to the keys. So please adjust the keys so that it is clear that they are lake specific

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alifarooq93 What we actually wanted to achieve is that we one generic fetching logic for all configured input layers. So that we don't need to implement something for new use cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants